package com.tt.lcd.qunyangGPRS.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ListView;
import android.widget.SimpleAdapter;

import com.tt.lcd.qunyangGPRS.R;
import com.tt.lcd.qunyangGPRS.dao.DataManager;

import java.util.HashMap;
import java.util.List;

public class QyDangtianInfo extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.qy_dangtian_daitai);
		ListView listView = (ListView) this.findViewById(R.id.dantai_list);

		Intent it = getIntent();

		String zhanID = it.getExtras().getString("zhanId");

		// 获取到集合数据
		List<HashMap<String, Object>> data = new DataManager(this).getNowdaitai(zhanID);
		SimpleAdapter adapter = new SimpleAdapter(this, data,
				R.layout.dantai_list, new String[] { "erbiao", "ycaisi",
				"yicaisi", "weiwan" }, new int[] { R.id.pig_id,
				R.id.jihua, R.id.jinsi, R.id.weiwan });
		// 实现列表的显示
		listView.setAdapter(adapter);


	}

}
